<?php
/* @var $this CountAdminController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'Count Admins',
);
$this->menu=array(
    array('label'=>'统计', 'url'=>array('company')),
    array('label'=>'最近20天', 'url'=>array('companyCountDay')),
    array('label'=>'最近12个月', 'url'=>array('companyCountYear')),
);

?>
<link rel='stylesheet' type='text/css' href='<?php echo Yii::app()->request->baseUrl; ?>/css/fullcalendar.css' />
<script type='text/javascript' src='<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->request->baseUrl; ?>/js/fullcalendar.js'></script>

<script type='text/javascript'>

    $(document).ready(function() {

        $('#calendar').fullCalendar({
            events: "<?php echo Yii::app()->createUrl('countAdmin/json_company').'&id='.Yii::app()->user->id;?>" ,
            monthNames: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
            monthNamesShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
            dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
            dayNamesShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
            today: ["今天"],
            buttonText: {
                today: '今天',
                month: '月',
                week: '周',
                day: '日'
            },
            loading: function(bool) {
                if (bool) $('#loading').show();
                 else $('#loading').hide();
            }
            // editable: false,
            // cache: true
        });

    });

</script>
<div class="countnum">总用户数:<?php echo $count_users;?> 总访问数:<?php echo $count_connections;?></div>
<div id='loading' style='display:none'><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/admin/loading.gif"/>加载中...</div>
<div id='calendar'></div>